/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.comfacauca.xmlc2.entidades.glpi;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author eorozco
 */
@Entity
@Table(name = "glpi_tickettasks")
@NamedQueries({
    @NamedQuery(name = "GlpiTickettasks.findAll", query = "SELECT g FROM GlpiTickettasks g"),
    @NamedQuery(name = "GlpiTickettasks.findById", query = "SELECT g FROM GlpiTickettasks g WHERE g.id = :id"),
    @NamedQuery(name = "GlpiTickettasks.findByTicketsId", query = "SELECT g FROM GlpiTickettasks g WHERE g.ticketsId = :ticketsId"),
    @NamedQuery(name = "GlpiTickettasks.findByTaskcategoriesId", query = "SELECT g FROM GlpiTickettasks g WHERE g.taskcategoriesId = :taskcategoriesId"),
    @NamedQuery(name = "GlpiTickettasks.findByDate", query = "SELECT g FROM GlpiTickettasks g WHERE g.date = :date"),
    @NamedQuery(name = "GlpiTickettasks.findByUsersId", query = "SELECT g FROM GlpiTickettasks g WHERE g.usersId = :usersId"),
    @NamedQuery(name = "GlpiTickettasks.findByIsPrivate", query = "SELECT g FROM GlpiTickettasks g WHERE g.isPrivate = :isPrivate"),
    @NamedQuery(name = "GlpiTickettasks.findByActiontime", query = "SELECT g FROM GlpiTickettasks g WHERE g.actiontime = :actiontime"),
    @NamedQuery(name = "GlpiTickettasks.findByBegin", query = "SELECT g FROM GlpiTickettasks g WHERE g.begin = :begin"),
    @NamedQuery(name = "GlpiTickettasks.findByEnd", query = "SELECT g FROM GlpiTickettasks g WHERE g.end = :end"),
    @NamedQuery(name = "GlpiTickettasks.findByState", query = "SELECT g FROM GlpiTickettasks g WHERE g.state = :state"),
    @NamedQuery(name = "GlpiTickettasks.findByUsersIdTech", query = "SELECT g FROM GlpiTickettasks g WHERE g.usersIdTech = :usersIdTech"),
    @NamedQuery(name = "GlpiTickettasks.findByFechaRegistro", query = "SELECT g FROM GlpiTickettasks g WHERE g.fechaRegistro = :fechaRegistro")})
public class GlpiTickettasks implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "tickets_id")
    private int ticketsId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "taskcategories_id")
    private int taskcategoriesId;
    @Column(name = "date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date date;
    @Basic(optional = false)
    @NotNull
    @Column(name = "users_id")
    private int usersId;
    @Lob
    @Size(max = 2147483647)
    @Column(name = "content")
    private String content;
    @Basic(optional = false)
    @NotNull
    @Column(name = "is_private")
    private boolean isPrivate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "actiontime")
    private int actiontime;
    @Column(name = "begin")
    @Temporal(TemporalType.TIMESTAMP)
    private Date begin;
    @Column(name = "end")
    @Temporal(TemporalType.TIMESTAMP)
    private Date end;
    @Basic(optional = false)
    @NotNull
    @Column(name = "state")
    private int state;
    @Basic(optional = false)
    @NotNull
    @Column(name = "users_id_tech")
    private int usersIdTech;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecha_registro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaRegistro;

    public GlpiTickettasks() {
    }

    public GlpiTickettasks(Integer id) {
        this.id = id;
    }

    public GlpiTickettasks(Integer id, int ticketsId, int taskcategoriesId, int usersId, boolean isPrivate, int actiontime, int state, int usersIdTech, Date fechaRegistro) {
        this.id = id;
        this.ticketsId = ticketsId;
        this.taskcategoriesId = taskcategoriesId;
        this.usersId = usersId;
        this.isPrivate = isPrivate;
        this.actiontime = actiontime;
        this.state = state;
        this.usersIdTech = usersIdTech;
        this.fechaRegistro = fechaRegistro;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getTicketsId() {
        return ticketsId;
    }

    public void setTicketsId(int ticketsId) {
        this.ticketsId = ticketsId;
    }

    public int getTaskcategoriesId() {
        return taskcategoriesId;
    }

    public void setTaskcategoriesId(int taskcategoriesId) {
        this.taskcategoriesId = taskcategoriesId;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getUsersId() {
        return usersId;
    }

    public void setUsersId(int usersId) {
        this.usersId = usersId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean getIsPrivate() {
        return isPrivate;
    }

    public void setIsPrivate(boolean isPrivate) {
        this.isPrivate = isPrivate;
    }

    public int getActiontime() {
        return actiontime;
    }

    public void setActiontime(int actiontime) {
        this.actiontime = actiontime;
    }

    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getUsersIdTech() {
        return usersIdTech;
    }

    public void setUsersIdTech(int usersIdTech) {
        this.usersIdTech = usersIdTech;
    }

    public Date getFechaRegistro() {
        return fechaRegistro;
    }

    public void setFechaRegistro(Date fechaRegistro) {
        this.fechaRegistro = fechaRegistro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GlpiTickettasks)) {
            return false;
        }
        GlpiTickettasks other = (GlpiTickettasks) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.comfacauca.xmlc2.entidades.glpi.GlpiTickettasks[ id=" + id + " ]";
    }
    
}
